package org.jeecg.modules.demo.mes.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.demo.mes.entity.ManageDevice;
import org.jeecg.modules.demo.mes.service.IManageDeviceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Class:MachineController
 * @Description:@TODO
 * @Author: author
 * @Date: 2023/1/12 11:50
 */

@Api(tags="机器设备")
@RestController
@RequestMapping("/mes/camelliaMesProcessPlan")
@Slf4j
public class MachineController {

    @Autowired
    IManageDeviceService manageDeviceService;

    @ApiOperation(value="机器设备", notes="机器设备")
    @GetMapping(value = "/all_enable")
    public Result<List<ManageDevice>> all_enable() {
        QueryWrapper<ManageDevice> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("state","0");
        queryWrapper.eq("type",0);
        List<ManageDevice> list = manageDeviceService.list(queryWrapper);
        return Result.OK(list);
    }

}
